//
//  UserDefaultsUtil.h
//  SettingBundle
//
//  Created by chenliang on 14-4-28.
//  Copyright (c) 2014年 chenliang. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface UserDefaultsUtil : NSObject

//获取UserDefaults实例
+(NSUserDefaults*)init;

//保存值
+(void)setObject:(id)value forKey:(NSString*)key;
//获取值
+(id)objectForKey:(NSString*)key;


//保存整形值
+(void)setInteger:(NSInteger)value forKey:(NSString*)key;
//获取整形值
+(NSInteger)integerForKey:(NSString*)key;


//保存布尔值
+(void)setBool:(BOOL)value forKey:(NSString*)key;
//获取布尔值
+(BOOL)boolForKey:(NSString*)key;


//保存单精度值
+(void)setFloat:(float)value forKey:(NSString*)key;
//获取单精度值
+(float)floatForKey:(NSString*)key;


//保存双精度值
+(void)setDouble:(double)value forKey:(NSString*)key;
//获取双精度值
+(double)doubleForKey:(NSString*)key;

@end
